Various applications are known in the prior art as 3D simulator devices used in, for example, 3D games or piloting simulators for aircraft or various vehicle. In a 3D simulator device shown in FIG. 9, image information relating to a 3D object 300 is previously stored in the device. This 3D object 300 represents a display object that a player (observer) 302 can see via a screen 306. Image Information of the 3D object 300 is subjected to perspective projection conversion on the screen 306 so that a pseudo-3D image (projected image) 308 is displayed on the screen 306. With this device, if the player 302 performs an operation such as a rotation or translation using a control panel 304, given 3D calculation processing is performed on the basis of a control signal thereof. A calculation is first performed to determine whether there is a change in a factor such as the viewpoint position or line-of-sight direction of the player 302 or the position or direction of the moving vehicle in which the player 302 is seated. Next, a calculation is performed to determine how the image of the 3D object 300 will appear on the screen 306 in response to this change in the viewpoint position and line-of-sight direction, or other change. The above calculation processing is performed in real time to follow the actions of the player 302. This enables the player 302 to experience a virtual 3D space in which a change in scenery concomitant with a change in the player's own viewpoint position and line-of-sight direction or a change in the position and direction of the moving vehicle can be seen in real time as a pseudo-3D image.
An example of the 3D simulator device of this invention is shown in FIG. 18. Note that the description below proceeds on the assumption that the 3D simulator device is applied to a 3D game.
As shown in FIG. 18, the 3D simulator device of this invention is configured of a control section 510, a virtual 3D space calculation section 500, an image synthesis section 512, and a CRT 518.
The virtual 3D space calculation section 500 sets a virtual 3D space in accordance with control signals from the control section 510 and a games program stored in a central processing section 506. In other words, it performs calculations to determine what the position of the 3D object 300 is and in what direction is it arranged.
The image synthesis section 512 comprises an image supply section 514 and an image forming section 516. The image synthesis section 512 performs image synthesis of a pseudo-3D image in accordance with setting information on a virtual 3D space from a virtual 3D space calculation section 500.
3D objects that configure a virtual 3D space are represented by this 3D simulator device as polyhedrons divided into 3D polygons. For example, the 3D object 300 shown in FIG. 17 is represented as a polyhedron divided into 3D polygons (1) to (6) (polygons (4) to (6) are not shown in the figure). Coordinates and accompanying data (hereinafter called vertex image information) for each vertex of these 3D polygons are stored in a 3D image information memory section 552.
Various types of calculation such as rotation or translation with respect to this vertex image information and various types of coordinate conversion such as perspective projection conversion are performed by the image supply section 514 in accordance with setting information of the virtual 3D space calculation section 500. After the vertex image information that has been subjected to this calculation processing has been converted in line with a given sequence, it is output to the image forming section 516.
The image forming section 516 comprises a polygon generation circuit 570 and a palette circuit 580, and the polygon generation circuit 570 comprises an outline point calculation section 324 and a line processor 326. Calculation processing to paint the dots within polygons with given color data is performed by the image forming section 516 in the sequence described below.
First of all, left and right outline points that are the intersections between the outline of a polygon and a scan line are calculated in the outline point calculation section 324. The portion bounded by these left and right outline points is then painted in the specified color by the line processor 326. The thus-painted color data is subsequently converted into RGB data in the palette circuit 580 and is output to the CRT 518.
With the 3D simulator device of the above configuration, the calculations described below are performed by the image supply section 514.
Taking a driving game as an example, as shown in FIG. 19, 3D objects 300, 333, and 334 representing objects such as a steering wheel, a building, and a billboard, which are read out from the 3D image information memory section 552 are arranged in a 3D space expressed by a world coordinate system (XW, YW, ZW). Subsequently, image information representing those 3D objects is subjected to coordinate conversion to a viewpoint coordinate system (Xv, Yv, Zv) based on the viewpoint of the player 302.
Next, a type of image processing that is called clipping processing is performed. Clipping processing is image processing whereby image information that is outside the field of view of the player 302 (or outside the field of view of a window opening into the 3D space), in other words, image information that is outside a region bounded by clipping surfaces 1, 2, 3, 4, 5, and 6 (hereinafter called a display region 20), is excluded. The image information necessary for subsequent processing by this 3D simulator device is only the image information that is within the field of view of the player 302. This means that, if all other information could be excluded, the load during subsequent processing could be reduced. Although there are objects in all directions around the player 302, if it could be arranged such that only those of the objects that are within the field of view are processed, the quantity of data to be processed subsequently can be greatly reduced, so that the 3D simulator device executes only essential image processing during real-time image processing.
This is described below in more detail with reference to FIG. 19. Image information on an object outside the field of view of the player 302 (outside the display region 20), such as the 3D object 334 representing a billboard that has moved out of the field of view and backwards, is excluded. This exclusion processing is performed by determining whether or not an object is within a display region for each of the clipping surfaces 1 to 6, then excluding the object only if it is outside all of those surfaces.
In contrast thereto, for the 3D object 333 of a building or the like that is on the boundary of the display region 20, the part thereof that is outside the display region 20 is excluded, and only the part that is within the display region 20 is used in subsequent image processing. The image information of the 3D object 300 of the steering wheel or the like, which is completely included within the display region 20, is used as is in the subsequent image processing.
Finally, perspective projection conversion to the screen coordinate system (XS, YS) is performed only for objects within the display region 20, then sorting processing is performed.
Since the clipping processing ensures a huge reduction in the amount of image data used in the image processing after the clipping processing, this type of 3D simulator device can perform essential image processing.
However, as shown in FIG. 19, this clipping processing has to be performed for all of the clipping surfaces 1 to 6, and in practice the image processing regulates the speed of the entire circuitry of this 3D calculation section 316 the most.
In particular, a 3D simulator device that has to perform image processing of a pseudo-3D image in real time, in other words a device creates a display screen every 1/60 second, a drop in speed will lead directly to a deterioration in image quality, causing major problems. Thus the implementation of faster, optimized clipping processing for this type of 3D simulator device has become the technical subject.